/*
    XTU OJ: 1060
    Link: https://acm.xtu.edu.cn/exam/index.php/problem/exam_read/id/1060
    by: fifth_light
*/

import java.util.Scanner;
import java.util.regex.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Pattern pattern = Pattern.compile("^ *(\\+|-){0,1} *([1-9][0-9]*|[0-9]) *$");
        
        while(scanner.hasNextLine()) {
            String str = scanner.nextLine();
            Matcher matcher = pattern.matcher(str);
            System.out.println(matcher.find() ? "Yes" : "No");
        }
    }
}
